package cn.javass.dp.iterator.mydemo1;

public class Client {

    public static void main(String[] args) {
        String[] aa = {"aa","bb","cc"};
        Aggregate aggregate = new ConcreteAggregate(aa);
        Iterator iterator = aggregate.createIterator();
        iterator.first();
        while (!iterator.isDone()) {
            Object o = iterator.currentItem();
            System.out.println(o);
            iterator.next();
        }

    }
}
